class Blog::PostsController < ApplicationController
  layout 'blog', :except => 'feed'

  def index
    @posts = Post.find :all, :order => 'created_at DESC', :limit => 10;
  end

  def show
    @post = Post.find params[:id]
  end

  def list
    date = params[:date].to_s
    @posts = Post.find :all, :order => 'created_at', :conditions => ["created_at like ?", date + '-%']
    @date_range = params[:date]
  end

  def feed
    @posts = Post.find :all, :limit => 10, :order => 'created_at DESC'
  end

end
